package com.zhuo.boot.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Data
@ToString
@AllArgsConstructor //有参构造器
@NoArgsConstructor  //全参构造器
//@Component  //只有在容器中的组件，才会有SpringBoot提供的强大功能
@ConfigurationProperties(prefix = "mycar")  //将javaBen与配置文件中的属性绑定
public class Car {
    private String brand;
    private Integer price;
}
